<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var dataSource = {};
			var analysisXML = function(data){
				var divObj = document.createElement("div");
				divObj.innerHTML = data;
				
// 				console.log(divObj.getElementsByTagName("workflow")[0].children)
				console.log(divObj.getElementsByTagName("Start")[0].attributes)
// 				console.log(divObj.getElementsByTagName("activities")[0])
// 				console.log(divObj.getElementsByTagName("activities")[0].children) // 正确
			}
			var xmlhttp = null;
			var data = null;
			if(window.XMLHttpRequest){
				xmlhttp = new XMLHttpRequest();
			}else{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			xmlhttp.onreadystatechange = function(){
				if(xmlhttp.readyState == 4 && xmlhttp.status == 200){
					data = xmlhttp.responseText;
				}
				if(data){
					analysisXML(data);
				}
				// console.log(data);
			}
			xmlhttp.open("GET","file/readedFile.xml");
			xmlhttp.send();
			
			
		</script>
	</body>
</html>